import request from '@/utils/request';

// 角色列表
export const rolesList = params => request({
    url: '/roles/list',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 角色添加
export const rolesAdd = params => request({
    url: '/roles/add',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 角色修改
export const rolesUpdate = params => request({
    url: '/roles/update',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 角色详情
export const rolesDetail = params => request({
    url: '/roles/detail',
    method: 'GET',
    params
});
// 角色删除
export const rolesDel = params => request({
    url: '/roles/deleteRole',
    method: 'GET',
    params
});
// 角色查询当前登陆人所属部门的所有角色列表
export const roleListForYard = params => request({
    url: '/roles/roleListForYard',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
